package com.course.event;


import java.util.HashMap;

public class EventVo {
    String name = "";

    HashMap<String, Object> param = new HashMap<>();


    public String getName() {
        return name;
    }

    public EventVo(String name) {
        this.name = name;
    }

    public EventVo build(String key, Object value) {
        param.put(key, value);
        return this;
    }

    public Object getValueByKey(String key) {
        if (param.containsKey(key)) {
            return param.get(key);
        }
        return null;
    }

    @Override
    public String toString() {

//       String vaule =  GsonUtil.HasToJson(param);
        return "[" +"name="+name+",value="+
                "]";
    }
}
